import request from '@/utils/request'

// 查询关键指标的条件列表
export function listHomeIndicatorsConditions(query) {
  return request({
    url: '/conditions/homeIndicatorsConditions/list',
    method: 'get',
    params: query
  })
}

// 查询关键指标的条件详细
export function getHomeIndicatorsConditions(id) {
  return request({
    url: '/conditions/homeIndicatorsConditions/' + id,
    method: 'get'
  })
}

// 保存关键指标的条件
export function saveHomeIndicatorsConditions(data) {
  return request({
    url: '/conditions/homeIndicatorsConditions/save',
    method: 'post',
    data: data
  })
}

// 删除关键指标的条件
export function delHomeIndicatorsConditions(id) {
  return request({
    url: '/conditions/homeIndicatorsConditions/' + id,
    method: 'delete'
  })
}

// 导出关键指标的条件
export function exportHomeIndicatorsConditions(query) {
  return request({
    url: '/conditions/homeIndicatorsConditions/export',
    method: 'get',
    params: query
  })
}

// 根据关键指标ID获取查询条件数据
export function getByIndicatorsId(indicatorsId) {
  return request({
    url: '/conditions/homeIndicatorsConditions/getByIndicatorsId',
    method: 'get',
    params: { 'indicatorsId': indicatorsId }
  })
}
